//
//  UILabel+Text.h
//  StaffTax
//
//  Created by 侯伟 on 2020/6/2.
//  Copyright © 2020 侯伟. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UILabel (Text)

+(NSAttributedString *)theRichText:(NSString *)string theRange:(NSUInteger)theRange changeRange:(NSInteger)changeRange color:(UIColor *)color;

- (CGFloat)stringHeight:(NSString*)string maxW:(CGFloat)maxW;

/// 并根据文本长度 省略显示
/// @param text 文本
/// @param breakIndex 保留行数
- (NSInteger)setText:(NSString*)text breakIndex:(NSInteger)breakIndex;

- (NSInteger)setText:(NSString*)text breakIndex:(NSInteger)breakIndex lineWidth:(CGFloat)lineWidth;

- (NSArray*)getTextLinesArray:(NSString*)text lineWidth:(CGFloat)lineWidth;

@end

NS_ASSUME_NONNULL_END
